#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
#include <QMouseEvent>
#include <QDebug>

Widget::Widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Widget)
{
    ui->setupUi(this);
    //setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    move(100,100);
    qDebug() << "w.pos" << pos();
    qDebug() << "w.x" << x();
    qDebug() << "w.y" << y();

    qDebug() << "w.geometry" << geometry();
    qDebug() << "w.frameGeometry" << frameGeometry();
}

Widget::~Widget()
{
    delete ui;
}

void Widget::mouseMoveEvent(QMouseEvent *event)
{

}

void Widget::mousePressEvent(QMouseEvent *event)
{
    qDebug() << "global" << event->globalPos();
    qDebug() << "topleft" << frameGeometry().topLeft();
}
